package com.infotel.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;

import javax.swing.JFrame;

import com.infotel.media.DVD;
import com.infotel.test.FenetreDVD;

public class NouveauListener implements ActionListener {

    JFrame fenetre;
    Connection conn;
    FenetreDVD fenetreDVD;

    public NouveauListener(JFrame fenetre, Connection conn, FenetreDVD fenetreDVD) {
        this.fenetre = fenetre;
        this.conn = conn;
        this.fenetreDVD = fenetreDVD;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        DVD.saisieDVD(fenetre, conn);
        fenetreDVD.afficherTableauDVD(conn);
    }

}
